package org.jeecg.modules.storage.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecg.common.aspect.annotation.AutoRecordLog;
import org.jeecg.common.aspect.annotation.LogtimeEntityListener;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.EntityListeners;
import java.io.Serializable;
import java.util.Date;

/**
 * @Description: 入库单
 * @Author: jeecg-boot
 * @Date:   2024-06-20
 * @Version: V1.0
 */
@ApiModel(value="buss_storage对象", description="入库单")
@Data
@TableName("buss_storage")
@AutoRecordLog(value = 1)
@EntityListeners(LogtimeEntityListener.class)
public class BussStorage implements Serializable {
    private static final long serialVersionUID = 1L;

	/**主键*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private Date createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private Date updateTime;
	/**所属部门*/
    @ApiModelProperty(value = "所属部门")
    private String sysOrgCode;
	/**编号*/
	@Excel(name = "编号", width = 15)
    @ApiModelProperty(value = "入库单编号")
    private String code;
	/**入库类型*/
	@Excel(name = "入库类型", width = 15)
    @ApiModelProperty(value = "入库类型")
    private Integer storageType;
	/**上级单号*/
	@Excel(name = "上级单号", width = 15)
    @ApiModelProperty(value = "上级单号")
    private String superiorCode;
	/**入库日期*/
	@Excel(name = "入库日期", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "入库日期")
    private Date storageDate;
	/**供应商id*/
	@Excel(name = "供应商id", width = 15)
    @ApiModelProperty(value = "供应商id")
    private String supplierId;
	/**批次号*/
	@Excel(name = "批次号", width = 15)
    @ApiModelProperty(value = "批次号")
    private String lotNumber;
    /**
     * 原材料入库类型
     */
    @TableField(updateStrategy = FieldStrategy.IGNORED, insertStrategy = FieldStrategy.IGNORED)
    private Integer materialType;

    /**
     * 包装入库类型
     */

    @TableField(updateStrategy = FieldStrategy.IGNORED, insertStrategy = FieldStrategy.IGNORED)
    private Integer packageType;

    @ApiModelProperty(value = "通知单id")
    private String noticeId;

    @JsonIgnore
    @ApiModelProperty(value = "日志时间")
    private String logtime;

    @ApiModelProperty(value = "业务节点")
    private String businessNode;
    @ApiModelProperty(value = "物料大类")
    private String materialTypeName;
    @ApiModelProperty(value = "物料大类")
    private String materialTypeCode;
    @ApiModelProperty(value = "业务类型")
    private String businessType;

    @ApiModelProperty(value = "是否打印")
    private Integer isPrinted;
}
